package jwanalytics.dbloader;


import java.util.StringTokenizer;
import java.util.Vector;

import junit.framework.TestCase;
import jwanalytics.dbloader.DB;
import jwanalytics.dbloader.Props;

/** This will test if all database tables have been created. */
public class RecreateDatabaseTest extends TestCase {
	
	
	/** Tests if all tables have been created on the database. */
	public void testAllTablesCreated() throws Exception {
		Props.init(Props.PROPS_FILE, false);
		StringBuilder sb = new StringBuilder("SELECT * FROM ");
		Vector<String> vAllTablesList = DB.getAllTableNames(Props.PROPS_FILE);
		for (int i = 0; i < vAllTablesList.size(); ++i) {
			DB.executeStatement(new StringBuilder(sb).append(vAllTablesList.get(i)).toString());
		}
	}
	
	
}
